package com.catchu.pattern.creational.构造器模式.cup;

public class Director {

    private Builder builder;

    public Builder getBuilder() {
        return builder;
    }

    public void setBuilder(Builder builder) {
        this.builder = builder;
    }

    public void create(){
        builder.line();
        builder.cap();
        builder.cupBody();
        builder.getResult().show();
    }

    public static void main(String[] args) {
        Director director = new Director();
        Builder builder = new SportCupBuilder();
        director.setBuilder(builder);

        director.create();

    }
}
